<template>
	<view>
	<!-- 	<view class="commentRow">
			<view>
				商品评分
			</view>
			<uniRate activeColor="#ed413b" :disabled="true" :value='comment? comment.goodsRate: goodsRate' :margin="5"></uniRate>
			<view class="rate">{{comment? comment.goodsRate: goodsRate}}分</view>
		</view>
		<view class="commentRow" v-if="!goodsComment">
			<view>
				服务评分
			</view>
			<uniRate activeColor="#ed413b" :disabled="true" :value='comment? comment.serviceRate: serviceRate' :margin="5"></uniRate>
			<view class="rate">{{comment? comment.serviceRate: serviceRate}}分</view>
		</view>
		<view class="commentRow" v-if="!goodsComment">
			<view>
				时效评分
			</view>
			<uniRate activeColor="#ed413b" :disabled="true" :value='comment? comment.expressRate: expressRate' :margin="5"></uniRate>
			<view class="rate">{{comment? comment.expressRate: expressRate}}分</view>
		</view> -->
		<view class="context">
			<view>
				点评内容
			</view>
			<view class="content">
				{{comment? comment.commetnText: commetnText}}
			</view>
		</view>
		<view class="updateTips">
			评价附件
		</view>
		<view class="picBox">
			<block v-if="comment && comment.imgs.length">
				<view class="picCon" v-for="(item,index) in comment.imgs" :key="index">
					<image class="pic" :src="item"></image>
				</view>
			</block>

		</view>
	</view>
</template>

<script>
	import uniRate from '@/components/uni-rate/uni-rate.vue'
	import uniIcons from "@/components/uni-icons/uni-icons.vue"
	export default {
		props:{goodsComment:{type:Boolean,default:false},comment:{type:Object,default:null}},
		components: {
			uniRate,
			uniIcons
		},
		
		data() {
			return {
				commentPics: [],
				commetnText:"",
				goodsRate:0,
				serviceRate:0,
				expressRate:0,
			};
		}
	}
</script>

<style lang="scss">
	.updateTips {
		height: 60rpx;
		line-height: 60rpx;
		font-size: $uni-font-size-base;
	}

	.picBox {
		@extend %flexWrap;
		padding: 26rpx 30rpx;

		.picCon {
			width: 160rpx;
			height: 160rpx;
			border-radius: 8rpx;
			margin: 11rpx 20rpx 11rpx 0;
			position: relative;

			.pic {
				width: 160rpx;
				height: 160rpx;
				border-radius: 8rpx;
			}

		}


	}

	.context {
		@extend %flexBetw;
		min-height: 88rpx;
		font-size: $uni-font-size-sm;
		padding: 20rpx 0;

		.content {
			width: 600rpx;
			line-height: 45rpx;
			text-indent: 2em;
		}
	}

	.commentRow {
		@extend %flexBetw;
		height: 88rpx;
		font-size: $uni-font-size-sm;

		.rate {
			color: #ea4341;
		}
	}
</style>
